package org.zjx.data.screen;

import org.zjx.command.entity.screen.Room;
import org.zjx.data.BaseSceneBuilder;
import java.awt.*;

public class DiFuSceneBuilder extends BaseSceneBuilder {

    @Override
    protected String getSceneName() {
        return "地府";
    }

    @Override
    protected Dimension getSceneSize() {
        return new Dimension(159, 119);
    }

    @Override
    protected void addMonsters() {

    }

    @Override
    protected void addNpcs() {
        addNpc("孟婆", new Point(96, 24));
        addNpc("牛头", new Point(96, 103));
        addNpc("马面", new Point(19, 33));
        addNpc("地遁鬼", new Point(27, 58));
        addNpc("追梦鬼", new Point(15, 12));
        addNpc("钟馗馗", new Point(44, 56));
        addNpc("地府商人", new Point(84, 10));
        addNpc("地府货商", new Point(70, 48));
    }

    @Override
    protected void addRooms() {
        // 轮回司
        Room lunHuiSi = createRoom("轮回司", null);
        addNpcToRoom(lunHuiSi, "黑无常", new Point(37, 16));
        addNpcToRoom(lunHuiSi, "白无常", new Point(26, 16));
        rooms.add(lunHuiSi);

        // 森罗殿
        Room senLuoDian = createRoom("森罗殿", new Dimension(59, 44));
        addNpcToRoom(senLuoDian, "阎罗王", new Point(28, 18));
        addNpcToRoom(senLuoDian, "转轮王", new Point(26, 17));
        addNpcToRoom(senLuoDian, "秦广王", new Point(30, 15));
        addNpcToRoom(senLuoDian, "初江王", new Point(34, 13));
        addNpcToRoom(senLuoDian, "宋帝王", new Point(38, 10));
        addNpcToRoom(senLuoDian, "卞城王", new Point(31, 22));
        addNpcToRoom(senLuoDian, "平等王", new Point(35, 12));
        addNpcToRoom(senLuoDian, "泰山王", new Point(39, 19));
        addNpcToRoom(senLuoDian, "都市王", new Point(43, 16));
        addNpcToRoom(senLuoDian, "杵官王", new Point(47, 14));
        addNpcToRoom(senLuoDian, "崔判官", new Point(17, 24));
        rooms.add(senLuoDian);

        // 地藏王府
        Room diZangWangFu = createRoom("地藏王府", new Dimension(57, 38));
        addNpcToRoom(diZangWangFu, "地藏王", new Point(28, 14));
        rooms.add(diZangWangFu);
    }

    @Override
    protected void addTeleports() {
        // 场景传送点
        addSceneTeleport(new Point(140, 6), "大唐国境", new Point(49, 325), new Point(146, 3));
        addSceneTeleport(new Point(105, 50), "轮回司", new Point(29, 10), new Point(105, 54));
        addSceneTeleport(new Point(32, 66), "森罗殿", new Point(45, 12), new Point(30, 68));
        addSceneTeleport(new Point(36, 107), "地狱迷宫一层", new Point(6, 65), new Point(36, 109));

        // NPC传送点
        addNpcTeleport("地府商人", new Point(147, 100), "鬼市", new Point(6, 15), new Point(150, 100));

        // 房间入口传送点
        addRoomTeleport(new Point(105, 50), "轮回司", new Point(29, 10), new Point(105, 54));
        addRoomTeleport(new Point(32, 66), "森罗殿", new Point(45, 12), new Point(30, 68));
        addRoomTeleport(new Point(29, 32), "地藏王府", new Point(35, 11), new Point(26, 34));
    }

    public static void main(String[] args) {
        DiFuSceneBuilder builder = new DiFuSceneBuilder();
        builder.execute("difu_scene.json", "地府");
    }
}